//
//  GFLxdTableViewCell.m
//  Qyer
//
//  Created by dlios on 15/10/23.
//  Copyright (c) 2015年 GF. All rights reserved.
//

#import "GFLxdTableViewCell.h"

@implementation GFLxdTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        _image = [[UIImageView alloc] initWithFrame:CGRectMake(5 * WIDTH, 5 * HEIGHT, 100 * WIDTH, 90 * HEIGHT)];
        [self.contentView addSubview:_image];
        
        _nameLable = [[UILabel alloc] initWithFrame:CGRectMake(110 * WIDTH, 5 * HEIGHT, SCREEN_WIDTH - 110 * WIDTH, 20 * HEIGHT)];
        [_nameLable setFont:[UIFont systemFontOfSize:WIDTH * 15.]];
        [_nameLable setTextColor:[NightMode shareNightModeHandle].wordColor];
        [self.contentView addSubview:_nameLable];
        
        _name_enLable = [[UILabel alloc] initWithFrame:CGRectMake(110 * WIDTH, 25 * HEIGHT, SCREEN_WIDTH - 110 * WIDTH, 20 * HEIGHT)];
        [_name_enLable setTextColor:[NightMode shareNightModeHandle].grayWordColor];
        [_name_enLable setFont:[UIFont systemFontOfSize:WIDTH * 14.]];
        [self.contentView addSubview:_name_enLable];
        
        _discriptionLable = [[UILabel alloc] initWithFrame:CGRectMake(110 * WIDTH, 45 * HEIGHT, SCREEN_WIDTH - 110 * WIDTH, 50 * HEIGHT)];
        [_discriptionLable setNumberOfLines:0];
        [_discriptionLable setFont:[UIFont systemFontOfSize:WIDTH * 14.]];
        [_discriptionLable setTextColor:[NightMode shareNightModeHandle].grayWordColor];
        [self.contentView addSubview:_discriptionLable];
    }
    return self;
}

- (void)getJnModel:(GFJnModel *)model{
    [_image sd_setImageWithURL:[NSURL URLWithString:model.image_url] placeholderImage:[UIImage imageNamed:@"zw.png"]];
    [_nameLable setText:model.name];
    [_name_enLable setText:model.name_en];
    [_discriptionLable setText:model.description_summary];
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
